package thread;

/**
 * Creater with IntelliJ IDEA.
 * Description:
 * User: 86152
 * Dae: 2022-07-21
 * Time: 9:15
 */

class myThread extends Thread {
    public void run() {
        while(true) {
            System.out.println("hello thread");
            try {
                sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
public class demo1 {
    public static void main(String[] args) {
        int a=0;
        Thread t= new myThread();
        t.start();
        while(true) {
            System.out.println("Hello");
            System.out.println();
        }
    }
}
